package io.jt808.proto.item;


import io.norland.buffer.AutoBuffer;
import io.norland.proto.IProto;

public class PositionAdditional30NetworkSignalStrength implements IProto {
    private byte networkSignalStrength;

    public byte[] writeToBytes() {
        return new byte[]{this.networkSignalStrength};
    }

    public void readFromBuf(AutoBuffer buffer) {
        this.networkSignalStrength = buffer.readByte();
    }

    public byte getNetworkSignalStrength() {
        return this.networkSignalStrength;
    }

    public void setNetworkSignalStrength(byte networkSignalStrength) {
        this.networkSignalStrength = networkSignalStrength;
    }

    public boolean equals(Object o) {
        if (o == this) return true;
        if (!(o instanceof PositionAdditional30NetworkSignalStrength)) return false;
        PositionAdditional30NetworkSignalStrength other = (PositionAdditional30NetworkSignalStrength) o;
        if (!other.canEqual(this)) return false;
        return getNetworkSignalStrength() == other.getNetworkSignalStrength();
    }

    protected boolean canEqual(Object other) {
        return other instanceof PositionAdditional30NetworkSignalStrength;
    }

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        return result * 59 + getNetworkSignalStrength();
    }

    public String toString() {
        return "PositionAdditional30NetworkSignalStrength(networkSignalStrength=" + getNetworkSignalStrength() + ")";
    }
}